/*******************************************************************************
 * Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 * 
 * This software is the confidential and proprietary information of ETCORE Labs.
 * You shall not disclose such confidential information and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with ETCORE Labs. 
 * 
 * Support can be obtained from support forums at:  http://www.etcore.com/
 * /
 *******************************************************************************/
package etcore.webapp.grouptalk.common.config;

import java.util.Properties;

/**
 * This class defines keys and values for configuration.
 * 
 * @author ETCORE GroupTalk Developers
 * 
 */
public class Config {
	private static Properties config;
 

	public static final String POSTFIX = "postfix";
	public static final String ENCRYPTEDURL1 = "encryptedUrl1";
	public static final String ENCRYPTEDURL2 = "encryptedUrl2";
	public static final String ENCRYPTEDURL3 = "encryptedUrl3";
	public static final String ENCRYPTEDURL4 = "encryptedUrl4";
	public static final String MSG_ENCRYPTEDURL = "msg_encryptedUrl";
	public static final String DEFAULT_LANG = "default_lang";
	public static final String LOCAL_LANG = "local_lang";
	public static final String ACTION_POSTFIX = ".action";
	public static final String REGISTER_ACTIVATION = "register_activation";
	public static final String P1 = "p1";
	public static final String P2= "p2";
	public static final String P11 = "p11";
	public static final String P22= "p22";
	public static final String P3 = "p3";
	public static final String P4 = "p4";
	public static final String HOURS_DIFFERENCE = "hours_difference";
	static {
		config = ConfigReader.readConfig();
	 
	}

	public static Properties getConfig() {
		return config;
	}

	public static String getProperty(String key) {
		if (config == null)
			config = ConfigReader.readConfig();
		return (String) config.get(key);
	}
	 
	public static void setProperty(String key,String value) {
		if (config == null)
			config = ConfigReader.readConfig();
		config.setProperty(key, value);	 
	}
}
